package myTest;

import java.io.IOException;
import java.net.URLEncoder;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;


public class UrlTest {
	public static void main(String[] args) {
		callTest();
	}

	public static void callTest() {
		GetMethod getMethod=null;

		HttpClient httpClient =new HttpClient();
    	
    	
    	try {
    		String uri="http://localhost:8088/sms-frontal/MessageController/test/123张/张";//获取路径地址
    		//uri = URLEncoder.encode(uri,"UTF-8");
    		System.out.println(uri);
        	getMethod = new GetMethod(uri);
			int state=httpClient.executeMethod(getMethod);
		} catch (Exception e) {
			e.printStackTrace();
		} 
	}
}
